<template>
	<view>
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="back">返回</block>
			<block slot="content">返佣记录</block>
		</cu-custom>
		<view>
			<view class="bcf mar3 round3 shadow-blur" v-for="item in list">
				<view class="flrc bdbso pad3">
					<view class="flex1 ">{{$com.str2time(item.createAt)}}</view>
					<view></view>
				</view >
				<view class="flrc pad3">
					<view class="fs14 flex1">{{item.tips}}</view>
					<view class="text-red  text-xxl" v-if="item.money < 0">{{item.money}}</view>
					<view class="text-green  text-xxl" v-if="item.money > 0">+{{item.money}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import list from "../../../static/js/list.js"
	export default {
		data() {
			return {
				list:[]
			}
		},
		methods: {
			
		},
		onLoad(){
			let _this = this
			list.setUrl("/api/moneyLogs")
			list.setCbFunc(function(res){
				console.log(res)
				_this.list = res
				uni.stopPullDownRefresh()
			})
			list.reload()
		},
		onReachBottom(){
			list.getList()
		},
		onPullDownRefresh(){
			list.reload()
		}
	}
</script>

<style>

</style>
